package d0416.访问作用域.同包;

public class 本类 {

	public int number1;
	protected int number2;
	int number3;
	private int number4;

	public void test() {
		/**
		 * 	访问当前对象的属性
		 */
		System.out.println(number1);		// public
		System.out.println(number2);		// protected
		System.out.println(number3);		// 缺省
		System.out.println(number4);		// private
		
		/**
		 * 	访问另一个对象的属性
		 */
		本类 bl = new 本类();
		System.out.println(bl.number1);		// public
		System.out.println(bl.number2);		// protected
		System.out.println(bl.number3);		// private
		System.out.println(bl.number4);		// private
	}

}
